using System;
using System.Collections.Generic;

using AppPriceLive.Entities.Utils;
using AppPriceLive.Entities.Models;
using AppPriceLive.DAL;
using AppPriceLive.Common;

namespace AppPriceLive.Biz
{
	public class CurrencyListService
	{
		/// <summary>
		/// Saves a record to the CurrencyList table.
		/// </summary>
		public virtual void Insert(CurrencyListInfo currencyListInfo)
		{
			try
			{
				new CurrencyListDAO().Insert(currencyListInfo);
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.CurrencyList - Insert", ex);
				throw;
			}

		}

		/// <summary>
		/// Saves a record to the CurrencyList table.
		/// </summary>
		public virtual void Update(CurrencyListInfo currencyListInfo)
		{
			try
			{
				new CurrencyListDAO().Update(currencyListInfo);
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.CurrencyList - Update", ex);
				throw;
			}

		}

		/// <summary>
		/// Delete a record from the CurrencyList table.
		/// </summary>
		public virtual void Delete(int? currenListId)
		{
			try
			{
				new CurrencyListDAO().Delete(currenListId);
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.CurrencyList - Delete", ex);
				throw;
			}

		}

		/// <summary>
		/// Selects a single record from the CurrencyList table.
		/// </summary>
		public virtual CurrencyListInfo Select(int? currenListId)
		{
			try
			{
				return new CurrencyListDAO().Select(currenListId);
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.CurrencyList - Select", ex);
				throw;
			}

		}

		/// <summary>
		/// Selects all records from the CurrencyList table.
		/// </summary>
		public List<CurrencyListInfo> SelectAll()
		{
			try
			{
				return new CurrencyListDAO().SelectAll();
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.CurrencyList - SelectAll", ex);
				throw;
			}

		}

	}
}
